<template>
  <div>
    <!-- <ul v-if="$route.path != '/reg' && $route.path != '/login'"> -->
    <ul v-if="!$route.meta.ishide">
      <router-link
        v-for="item in navList"
        :key="item.id"
        tag="li"
        :to="item.path"
        active-class="active"
        >{{ item.title }}</router-link
      >
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      navList: [
        {
          id: 1,
          title: "首页",
          path: "/home"
        },
        {
          id: 2,
          title: "分类",
          path: "/list" // /news
        },
        {
          id: 3,
          title: "购物车",
          path: "/cart"
        },
        {
          id: 4,
          title: "我的",
          path: "/mine"
        }
      ]
    };
  },

  components: {},

  methods: {},

  created() {
    console.log(this.$route, 777);
  },

  watch: {
    $route: {
      deep: true,
      handler(route) {
        console.log(route);
      }
    }
  }
};
</script>

<style scoped lang="scss">
@import "../assets/sass/appNav.scss";
</style>